<template>
  <view class="empty-state">
    <image 
      class="empty-image" 
      :src="image" 
      mode="aspectFit"
    ></image>
    <text class="empty-text">{{ text }}</text>
    <view class="empty-subtext" v-if="subText">{{ subText }}</view>
  </view>
</template>

<script>
export default {
  name: 'empty-state',
  props: {
    image: {
      type: String,
      default: '/static/page_icons/empty.png'
    },
    text: {
      type: String,
      default: '暂无数据'
    },
    subText: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss">
.empty-state {
  padding: 60rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  .empty-image {
    width: 240rpx;
    height: 240rpx;
    margin-bottom: 30rpx;
  }
  
  .empty-text {
    font-size: 32rpx;
    color: #666;
    margin-bottom: 12rpx;
  }
  
  .empty-subtext {
    font-size: 24rpx;
    color: #999;
    text-align: center;
  }
}
</style>